import Vue from 'vue'
import App from './App.vue'
import '@/utils/rem.js'
import router from './router/index'
import store from './store/index'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/css/style.less'

import lottie from "@/components/lottie.vue";
Vue.component('lottIe', lottie)

import VueTypedJs from 'vue-typed-js'
Vue.use(VueTypedJs)

import VueParticles from 'vue-particles'
Vue.use(VueParticles)

import VueAMap from 'vue-amap'
Vue.use(VueAMap);
// 初始化vue-amap
VueAMap.initAMapApiLoader({
	key: '61e9c27c19dfeffd142fdd83b911b23f',// 高德的key
	// 插件集合
	plugin: [
		'AMap.CircleEditor',// 圆形编辑器插件
		"AMap.Geolocation", // 定位控件，用来获取和展示用户主机所在的经纬度位置
		"AMap.Geocoder", // 地理编码与逆地理编码服务，用于地址描述与坐标间的相互转换
		"AMap.Autocomplete",
		"AMap.PlaceSearch",
		"AMap.CitySearch",
	],
	// 高德 sdk 版本，默认为 1.4.4
	v: '1.4.4'
});
//高德的安全密钥
window._AMapSecurityConfig = {
	securityJsCode:'b40fea10a39cbc94640fcc463885c28e',
}

Vue.config.productionTip = false

Vue.use(ElementUI);


new Vue({
  router,
  store,
  el: '#app',
  render: h => h(App),
}).$mount('#app')


// 全局的前置守卫
// router.beforeEach((to, from, next) => {
//   let token = store.state.token
//   if (token=='' && to.path !== '/login') {
//     next({ path: '/login' })
//   } else {
//     next()
//   }
// })